package com.pingba.service.msg;

import com.pingba.entity.User;
import com.pingba.entity.msg.MsgApply;
import com.pingba.entity.msg.MsgSend;
import com.pingba.service.BaseService;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2015/11/30 0030.
 */
public interface MsgApplyService extends BaseService<MsgApply, Long> {

    /**
     * 设置同意该条消息/活动的申请
     * @param apply
     */
    void agree(MsgApply apply);

    /**
     * 拒绝对该条消息/活动的申请
     * @param apply
     */
    void refuse(MsgApply apply);

    /**
     * 将所有的该用户消息的申请设置为已读
     * @param msgOwner
     */
    void setReaded(User msgOwner);

    /**
     * 获取所有该用户未处理过的消息/活动申请
     * @param msgOwner
     * @return
     */
    List<MsgApply> getUnReadList(User msgOwner);

    /**
     * 返回所有对我的消息/活动的申请
     * @param apply
     * @return
     */
    Map<Long,Map<String, Object>> myApplies(User apply);


    /**
     * 删除该用户id下的该条msgApplyId
     * @param msgApplyId msgApply中的id
     * @param userId 用户id
     * @return
     */
    boolean deleteMyMsgApply(long msgApplyId, long userId);

}
